<?php

require_once 'PipesImpl/User/Credentials.php';

class Pipes_User_Credentials implements PipesImpl_User_Credentials
{
	private $_identity = '';
	private $_isValid = false;

	public function __construct($identity, $isValid) {
		assert('is_string($identity)');
		assert('is_bool($isValid)');

		$this->_identity = $identity;
		$this->_isValid  = $isValid;
	}

	public function __get($key) {
		$return = null;
		switch ($key) {
			case 'identity':
			case 'isValid' :
				$realKey = '_' . $key;
				$return = $this->$realKey;
		}

		return $return;
	}
}
